`
https://leetcode.cn/problems/find-the-difference/
`

/**
 * @param {string} s
 * @param {string} t
 * @return {character}
 */
var findTheDifference = function (s, t) {
  const count = new Array(26).fill(0)
  for (let i = 0; i < s.length; i++) {
    const sIdx = s.charCodeAt(i) - 'a'.charCodeAt(0)
    const tIdx = t.charCodeAt(i) - 'a'.charCodeAt(0)
    count[sIdx]++
    count[tIdx]--
  }
  count[t.charCodeAt(t.length - 1) - 'a'.charCodeAt(0)]--

  for (let i = 0; i < 26; i++) {
    if (count[i] === -1) {
      return String.fromCharCode(i + 'a'.charCodeAt(0))
    }
  }
};